//
//  Const.swift
//  TestAPIManager
//
//  Created by yq on 2020/10/16.
//  Copyright © 2020 杨庆. All rights reserved.
//

import Foundation
import UIKit

public typealias EmptyBlock = () -> Void
public typealias DataBlock = (_ data: Data) -> Void
//public typealias PathBlock = (_ path: Path) -> Void


/// 屏幕宽度
let YscreenWidth = UIScreen.main.bounds.size.width
/// 屏幕高度
let YscreenHeight = UIScreen.main.bounds.size.height


/// 数据无效
let kErrmsg_ServerInvalid = "数据无效"
/// 数据无效
let kErrmsg_DataInvalid = "数据无效"
/// 网络失败
let kErrmsg_NetworkAnomaly = NSLocalizedString("HUD_NetworkAnomaly", comment:"")
/// 参数无效
let kErrmsg_InvalidParameter = NSLocalizedString("HUD_InvalidParameter", comment:"")


/// 自定义打印
public func dPrint(_ items:Any ..., file:String = #file,func:String = #function,line:Int = #line) {
    #if DEBUG
    var log = "\((file as NSString).lastPathComponent)[第\(line)行]：\n"
       items.forEach { print($0, separator: "", terminator: " ", to: &log) }
       print(log)
    #endif
}
